﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MSRoboticsFramework.ActuatorLayer.CompoundActuators
{
    public interface ITankTurret
    {
        /// <summary>
        /// The horizontal angle of the turret in relation to its initial position
        /// when the class instance was created. A value ranging from -1 to 1,
        /// where 0 is centered (the initial position), -1 is maximum left turn and
        /// 1 is maximum right turn.
        /// 
        /// Values out of bounds are either converted to limit values (in case there are
        /// any physical constraints) or wrapped around to values into the allowed range
        /// (in case there are no physical constraints).
        /// </summary>
        public float HorizontalAngle { get; set; }

        /// <summary>
        /// The horizontal turning speed of the turret. A decimal value ranging between 0 and 1,
        /// where 0 is stoped and 1 is maximum speed. The speed value affects all motion
        /// operations over the motor.
        /// 
        /// Values out of bounds are converted to limit values.
        /// </summary>
        public float HorizontalTurningSpeed { get; set; }

        /// <summary>
        /// Makes the turret turn left indefinitely or until the allowed angle by the specific turret is reached.
        /// </summary>
        public void TurnLeft();

        /// <summary>
        /// Makes the turret turn right indefinitely or until the allowed angle by the specific turret is reached.
        /// </summary>
        public void TurnRight();

        /// <summary>
        /// Stops any horizontal turning motion and brakes the turret over this DOF.
        /// </summary>
        public void StopHorizontalTurningAndBrake();

        /// <summary>
        /// The vertical angle of the turret in relation to its initial position
        /// when the class instance was created. A value ranging from 0 to 1,
        /// where 0 is the initial position or maximum down turn and 1 is maximum up turn.
        /// 
        /// Values out of bounds are either converted to limit values.
        /// </summary>
        public float VerticalAngle { get; set; }

        /// <summary>
        /// The vertical turning speed of the turret. A decimal value ranging between 0 and 1,
        /// where 0 is stoped and 1 is maximum speed. The speed value affects all motion
        /// operations over the motor.
        /// 
        /// Values out of bounds are converted to limit values.
        /// </summary>
        public float VerticalTurningSpeed { get; set; }

        /// <summary>
        /// Makes the turret turn up indefinitely or until the allowed angle by the specific turret is reached.
        /// </summary>
        public void TurnUp();

        /// <summary>
        /// Makes the turret turn down indefinitely or until the allowed angle by the specific turret is reached.
        /// </summary>
        public void TurnDown();

        /// <summary>
        /// Stops any vertical turning motion and brakes the turret over this DOF.
        /// </summary>
        public void StopVerticalTurningAndBrake();

        /// <summary>
        /// Stops any motion and brakes the turret over all DOF's.
        /// </summary>
        public void StopAndBrake();

        /// <summary>
        /// Commands the turret to fire once and reload.
        /// </summary>
        public void FireAndReload();
    }
}
